#include "JClientUtility.h"
#include "JConfig.h"
#include "JLogger.h"
#include <string>
#include <list>
#include "JSerialize.h"
#include "JWorkingCopies.h"

void JClientUtility::Run()
{
	//if(JConfig::Init("D:\\Projects\\Console Projects\\CPlusPlus\\JSubVersion2\\JSubVersion\\JSubVersion\\config.xml"))
	//{
	//	JLogger::Init(JConfig::GetConfig("LogFileDir").c_str());
	//}
	//else
	//{
	//	JLogger::Init(".");
	//	JLogger::Log("Configuration file is invalid.",JLogError);
	//	return;
	//}
	//JWorkingCopies copies("D:\\testJSvn");
	//copies.AddFile("hello");
	//copies.AddFile("world");
	//copies.AddFile("one");
	//copies.AddFile("two");
	//int tmp;
	//std::list<std::string> strList;
	//strList.push_back("hello");
	//strList.push_back("world");
	//strList.push_back("one");
	//strList.push_back("two");
	

	//std::iostream& strea = JSerialize::InitStream("buff.txt");
	////std::filebuf fb;
	////fb.open("buff.txt",std::ios::binary | std::ios::in | std::ios::out | std::ios::trunc);
	////std::iostream strea(&fb);
	//JWorkingCopies copies;
	//copies.rootDir = "D:\\repository";
	//copies.copiesFileName = strList;
	//copies.Serialize(strea,tmp);
	//strea.seekg(0,std::ios::beg);

	//JWorkingCopies copies2;
	//copies2.ReSerialize(strea);
}